#include "scheduler.h"


CXScheduler::CXScheduler()
{
    _taskmgr = new CXWinTaskMgr();
    _taskmgr->Init();
}

int CXScheduler::SchedulerLoop()
{
    SendTasks();
    return 0;
}

int CXScheduler::SendTasks()
{
	for(int i = 0; i < 20; ++i)
	{
		if((i%2) == 1)
			_tasks[i] = new CXTestTaskN();
		else
			_tasks[i] = new CXTestTaskH();

	}
    _taskmgr->ProcessTasks(_tasks,20);
    return 0;
}

int CXScheduler::UpdateTasks()
{
    return 0;
}

CXScheduler::~CXScheduler()
{
    delete _taskmgr;
}